package com.shimh.controller;

import java.util.List;

import com.shimh.common.annotation.LogAnnotation;
import com.shimh.vo.ArticleVo;
import com.shimh.vo.PageVo;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.support.spring.annotation.FastJsonFilter;
import com.alibaba.fastjson.support.spring.annotation.FastJsonView;
import com.shimh.common.constant.Base;
import com.shimh.common.constant.ResultCode;
import com.shimh.common.result.Result;
import com.shimh.entity.Article;
import com.shimh.entity.ArticleBody;
import com.shimh.entity.Notice;
import com.shimh.entity.Tag;
import com.shimh.entity.User;
import com.shimh.mapper.NoticeMapper;
import com.shimh.service.ArticleService;
import com.shimh.service.TagService;

/**
 * 公告api
 * @author edmond
 * @date 2022/03/18
 */
@RestController
@RequestMapping(value = "/notice/")
public class NoticeController {
    @Autowired
    private NoticeMapper noticeMapper;

    @GetMapping("list")
    public Result listNotice() {
        List<Notice> notices = noticeMapper.selectList(null);
        return Result.success(notices);
    }
}
